<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>面板折页</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading" id="div_stat">
                   <h3 class="panel-title">
                        <span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span> 统计企业
                   </h3>
                </div>
                <div class="panel-body form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">开始时间：</label>
                        <div class="col-sm-5">
                            <input type="text" value="" style="height: 36px;" class="form-control laydate-icon" id="start_time" name="start_time" placeholder="开始时间" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">结束时间：</label>
                        <div class="col-sm-5">
                            <input type="text" value="" style="height: 36px;" class="form-control laydate-icon" id="end_time" name="end_time" placeholder="结束时间" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-sm-5">
                            <input type="button" class="btn btn-primary form-control" value="统计" id="btn_company_stat" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">统计结果：</label>
                        <div class="col-sm-5">
                            <div class="form-control" id="company_result">等待计算结果</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<script>
$(function(){
    $("#div_stat").css("cursor", 'pointer');
    $("#btn_company_stat").click(function(){
        
    });
    $("#div_stat").click(function(){
        var _this = $(this);
        if(_this.next().is(":hidden")) {
            _this.next().show();
            _this.find("h3 span").removeClass("glyphicon-arrow-up").addClass("glyphicon-arrow-down");
        } else {
            _this.next().hide();
            _this.find("h3 span").removeClass("glyphicon-arrow-down").addClass("glyphicon-arrow-up");
        }
    });
});
var start = {
    elem: '#start_time',
    format: 'YYYY-MM-DD hh:mm:ss',
    min: laydate.now(), //设定最小日期为当前日期
    max: '2099-06-16 23:59:59', //最大日期
    istime: true,
    istoday: false,
    festival: true, //是否显示节日
    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas; //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end_time',
    format: 'YYYY-MM-DD hh:mm:ss',
    min: laydate.now(),
    max: '2099-06-16 23:59:59',
    istime: true,
    istoday: false,
    festival: true, //是否显示节日
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};
laydate(start);
laydate(end);
laydate.skin("yalan");
</script>
    </body>
</html>
